package com.cxz.study.domain.order.orderId;

import com.cxz.study.domain.common.CommonModel;
import lombok.*;

import java.util.UUID;

/**
 * @className: OrderId
 * @author: ocxz1
 * @date: 2025/6/13 下午6:56
 * @Version: 1.0
 * @description: ddd-struct3
 */
@Value
public class OrderId{
    Long value;

    public OrderId(Long value) {
        this.value = value;
    }

    public static OrderId generate() {
        // 生成UUID
        Long uuid = System.currentTimeMillis();
        return new OrderId(uuid);
    }
}
